home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bsignalwaiter.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1.1 KB  |  52 lines

  1. /* 
  2.  *
  3.  * $Id: sourceheader 380067 2005-01-19 13:03:46Z trueg $
  4.  * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_SIGNAL_WAITER_H_
  17. #define _K3B_SIGNAL_WAITER_H_
  18.  
  19. #include <qobject.h>
  20.  
  21. #include <k3b_export.h>
  22.  
  23. class K3bJob;
  24.  
  25. class K3bSignalWaiter : public QObject
  26. {
  27.   Q_OBJECT
  28.  
  29.  public:
  30.   /**
  31.    * Use this to syncroneously wait for a signal.
  32.    */
  33.   LIBK3B_EXPORT static void waitForSignal( QObject* o, const char* signal );
  34.  
  35.   /**
  36.    * Use this to syncroneously wait for a job to finish.
  37.    * If the job is not running at all this returns immedeately.
  38.    */
  39.   LIBK3B_EXPORT static void waitForJob( K3bJob* job );
  40.  
  41.  private slots:
  42.   void slotSignal();
  43.  
  44.  private:
  45.   K3bSignalWaiter();
  46.   ~K3bSignalWaiter();
  47.  
  48.   bool m_inLoop;
  49. };
  50.  
  51. #endif
  52.